<template>
  <k-page>
    <view class="title">{{news.name}}</view>
    <view>
      <rich-text :nodes="news.content"></rich-text>
    </view>
  </k-page>
</template>

<script>
import {getNewById} from "@api"
export default {
  name: "information",
  data(){
    return{
      id:0,
      news:{}
    }
  },
  onLoad({id}){
    this.id = id;
    getNewById({id})
        .then(res=>{
          this.news = res;
        })
  }
}
</script>

<style lang="scss" scoped>
.title{
  font-size: 40rpx;
  text-align: center;
  padding: 50rpx;
}
</style>
